{template '_header'}
<div class="page-heading"> <h2>基础设置</h2></div>
<div class="tabs-container">
    <form id="setform" action="" method="post" class="form-horizontal form-validate">
    <input type="hidden" id="tab" name="tab" value="{$_GPC['tab']}" />
    <ul class="nav nav-tabs" id="myTab">
        <li  {if empty($_GPC['tab']) || $_GPC['tab']=='basic'}class="active"{/if}><a href="#tab_basic">关注及分享</a></li>
        <li  {if $_GPC['tab']=='description'}class="active"{/if} ><a href="#tab_description">统一描述</a></li>
        <li  {if $_GPC['tab']=='trade'}class="active"{/if} ><a href="#tab_trade">交易管理</a></li>
        <li  {if $_GPC['tab']=='rights'}class="active"{/if} ><a href="#tab_rights">维权设置</a></li>
        <li  {if $_GPC['tab']=='rules'}class="active"{/if} ><a href="#tab_rules">拼团规则</a></li>
    </ul>
    <div class="tab-content ">
        <div class="tab-pane {if empty($_GPC['tab']) || $_GPC['tab']=='basic'}active{/if}" id="tab_basic">
            {template 'groups/set/basic'}
        </div>
        <div class="tab-pane {if $_GPC['tab']=='description'}active{/if}" id="tab_description">
            {template 'groups/set/description'}
        </div>
        <div class="tab-pane {if $_GPC['tab']=='trade'}active{/if}" id="tab_trade">
            {template 'groups/set/trade'}
        </div>
        <div class="tab-pane {if $_GPC['tab']=='rights'}active{/if}" id="tab_rights">
            {template 'groups/set/rights'}
        </div>
        <div class="tab-pane {if $_GPC['tab']=='rules'}active{/if}" id="tab_rules">
            {template 'groups/set/rules'}
        </div>
    </div>
    {ifp 'groups.set.edit'}
    <div class="form-group">
        <label class="col-sm-2 control-label"></label>
        <div class="col-sm-9 col-xs-12">
            <input type="submit"  value="提交" class="btn btn-primary" />
        </div>
    </div>
    {/if}
    </form>
</div>
<script language='javascript'>
    require(['bootstrap'], function () {
        $('#myTab a').click(function (e) {
            $('#tab').val($(this).attr('href'));
            e.preventDefault();
            $(this).tab('show');
        })
    });
</script>
{template '_footer'}